import request from '@/utils/request'

// 查询综测情况列表
export function listActivity(query) {
  return request({
    url: '/stuinfo/activity/list',
    method: 'get',
    params: query
  })
}

// 查询综测情况详细
export function getActivity(id) {
  return request({
    url: '/stuinfo/activity/' + id,
    method: 'get'
  })
}

// 新增综测情况
export function addActivity(data) {
  return request({
    url: '/stuinfo/activity',
    method: 'post',
    data: data
  })
}

// 修改综测情况
export function updateActivity(data) {
  return request({
    url: '/stuinfo/activity',
    method: 'put',
    data: data
  })
}

// 删除综测情况
export function delActivity(id) {
  return request({
    url: '/stuinfo/activity/' + id,
    method: 'delete'
  })
}



export function getStudentAbilityData() {
  return request({
    url: `/ability/innovation`,
    method: 'get'
  });
}

export function getStuWenti() {
  return request({
    url: `/ability/wenti`,
    method: 'get'
  }); 
}

export function getStujineng() {
  return request({
    url: `/ability/jntc`,
    method: 'get'
  });
}

export function getStushijian(){
  return request({
    url: `/ability/shijian`,
    method: 'get'
  });
}


export function getStusixiang() {
  return request({
    url: `/ability/sixiang`,
    method: 'get'
  });
}

export function getzhishi() {
  return request({
    url: `/ability/zhishi`,
    method: 'get'
  });
}

// 学生报名活动
export function signUpActivity(data) {
  return request({
    url: '/stuinfo/activityScore/signUp',
    method: 'post',
    data: data
  })
}

// 获取学生已报名的活动ID列表
export function getSignedUpActivities(studentId) {
  return request({
    url: '/stuinfo/activityScore/signedUpList',
    method: 'get',
    params: { studentId }
  })
}